home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
sa-book.zip
/
sendmail.cf
< prev
next >
Wrap
Text File
|
1989-09-27
|
21KB
|
566 lines
################################################################################
###
### Sendmail configuration file for the University of Colorado, Boulder
### Flavor: GrandPoohbah for use on boulder.Colorado.EDU
### Last update: Sun Aug 28 17:32:48 MDT 1988
###
################################################################################
# necessary evil. would rather initialize on cmd line w/ -oMw`hostname` or something.
DWboulder
##
# Q need only be be defined if you are using the uusndmail mailer
DQboulder
##
# my name. comes out on error messages
Dnpostmaster@$w
##
# revision date mmddyy
DZ082888
##
# flavor/revision date. appears on 'Received' header and smtp sign-on
DXcu.grandpoobah.$Z
##
# uucp hosts this machine talks to directly
FU/usr/lib/uucp/L.sys %[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_-]
##
# local DECNET gateway
DVcolo.colorado.edu
##
# BITNET gateway
DBvaxf.colorado.edu
##
# CSNET gateway host
DPrelay.cs.net
#
# ultimate authority host (if they can't get rid of it, no one can)
DSrelay.cs.net
##
# top-level domains that csnet likes to deal with... note that these are ones that
# get sent directly. ones not falling in this category (and no other special ones like
# BITNET or uucp) will get sent to $S for resolution
CTARPA EDU GOV MIL COM ORG NET
##
# this host's official domain
DDColorado.EDU
##
# define official host name (taken from $w which is from /bin/hostname)
# $w must include the domain if running the name server.
Dj$w
##
# sometimes they forget .edu so we have to answer to this too.
DMcolorado
##
# Class of machines in $D domain that are connected via uucp links, but do not
# want addresses in !bhangist format
CYuswat uswest mcbryan
##
# Hosts in Colorado.EDU (deliver direct smtp) -- should be from file
# Last update: Wed Jan 6 09:29:19 MST 1988
CCagua ajsh aleft alta clipr bakmes
CCanchor anchor annex-isn annex03 annex04
...
CCyaba yquem zippy quill gw-optics zeppo
##
# Hosts hidden behind boulder, From line reads boulder.Colorado.EDU
# Last update: Thu Dec 3 12:10:35 MST 1987
CAanchor ausone barney bass beagle becks
CAbones boulder brion chekov columbine dennis
...
CAnewton gauss picard laguerre raphson mcbryan
##
# DECNET nodes
# Last update: Wed Jan 6 09:27:33 MST 1988
CVacspc1 acstst albedo algol altair amino1 amino2 aquila arctic
CVaries athena auk bali booby boris canary ccncsm ccndu
...
CVvesta virgo vlsimv wizard wren zeppo zeus zodiac rover
#######################################
### Boilerplate: special macros ###
#######################################
# UNIX header format
DlFrom $g $d
# delimiter (operator) characters
Do.!:@^%/[]
# format of a total name
Dq$?x$x <$g>$|$g$.
# SMTP login message
De$j Sendmail $v/$X ready at $b
################################
### Boilerplate: options ###
################################
# location of alias file
OA/usr/lib/aliases
# default delivery mode (deliver in background)
Odbackground
# temporary file mode
OF0600
# default GID
Og1
# location of help file
OH/usr/lib/sendmail.hf
# log level
OL0
# default messages to old style
Oo
# queue directory
OQ/usr/spool/mqueue
# read timeout -- violates protocols
Or2h
# status file
OS/usr/lib/sendmail.st
# queue up everything before starting transmission
Os
# default timeout interval
OT2d
# time zone names (V6 only)
OtMST,MDT
# default UID
Ou1
# wizard's password
Ow************
# maximum load average before queueing mail
Ox25
# maximum load average before rejecting connections
OX30
############################################
### Boilerplate: message precedences ###
############################################
Pfirst-class=0
Pspecial-delivery=100
Pbulk=-60
Pjunk=-100
######################################
### Boilerplate: trusted users ###
######################################
Troot
Tdaemon
Tuucp
#Teric eric is Lee's 10 year old kid on our system
Tcoggs
##########################################
### Boilerplate: format of headers ###
##########################################
H?P?Return-Path: <$g>
HReceived: by $W.$D ($X); $b; id $i; from $s
H?D?Resent-Date: $a
H?D?Date: $a
H?F?Resent-From: $q
H?F?From: $q
H?x?Full-Name: $x
HSubject:
H?M?Message-Id: <$t.$i@$W.$D>
H?M?Resent-Message-Id: <$t.$i@$j>
S1
################################################################################
# Ruleset 1: Sender field pre-rewriting
################################################################################
# DECNET syntax
#R$-::$- $2@$1.decnet
R$-::$- $2@$1
R$-::$+ $2
S2
################################################################################
# Ruleset 2: Recipient field pre-rewriting
################################################################################
# DECNET syntax
#R$-::$- $2@$1.decnet
R$-::$- $2@$1
R$-::$+ $2
S3
################################################################################
### Ruleset 3: Name canonicalization
################################################################################
# handle "from:<>" special case
R<> $@@ turn into magic token
# basic textual canonicalization
R$*<$*<$*<$+>$*>$*>$* $4 3-level <> nesting
R$*<$*<$+>$*>$* $3 2-level <> nesting
R$*<$+>$* $2 basic RFC821/822 parsing
R$+ at $+ $1@$2 "at" -> "@" for RFC 822
R$*<$*>$* $1$2$3 in case recursive
# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
R@$+,$+ @$1:$2 change all "," to ":"
# handle source route address
R@$+:$+ $@<@$1>:$2 handle <route-addr>
# more miscellaneous cleanup
R$+:$*;@$+ $@$1:$2;@$3 list syntax
R$+@$+ $:$1<@$2> focus on domain
R$+<$+@$+> $1$2<@$3> move gaze right
R$+%$+ $:$>8$1%$2 user%host%host
R$+<@$+> $@$1<@$2> since already canonical, exit
# bhangist to domainist
R$+@$+.UUCP $@$1<@$2.UUCP> already done
R$+^$+ $1!$2 convert ^ to !
R$-!$+ $@$2<@$1.UUCP> resolve uucp names
R$-.$-.$-!$+ $@$4<@$1.$2.$3.UUCP>
S4
################################################################################
# Ruleset 4: Final output post-rewriting
################################################################################
R@ $@ handle <> error addr
# externalize local domain info
R$*<$+>$* $1$2$3 defocus
R@$+:$+:$+ @$1,$2:$3 <route-addr> canonical
S6
################################################################################
# Ruleset 6: Localhost deletion
################################################################################
R$*<$*@$=w>$* $1<$2@>$4 this host
R$*<$*@$=W>$* $1<$2@>$4 this host
R$*<$*@$W>$* $1<$2@>$3 this host
R$*<$*@$=w.$D>$* $1<$2@>$4 this host
R$*<$*@$W.$D>$* $1<$2@>$3 this host
R$*<$*@$W.$M>$* $1<$2@>$3
R$*<$*@$D>$* $1<$2@>$3
S7
################################################################################
# Ruleset 7: Explicit names of us as source route addresses
################################################################################
R<@$=w>:$* <@>:$1 this host
R<@$=W>:$* <@>:$1 this host
R<@$=W.$D>:$* <@>:$1 this host
R<@$=W.$M>:$* <@>:$1 this host
R<@$=D>:$* <@>:$1 this host
S8
################################################################################
# Ruleset 8: THE percent hack; Given multiple %'s change rightmost % to @.
################################################################################
R$*<$*>$* $1$2$3 defocus
R$*%$* $1@$2 First make them all @'s.
R$*@$*@$* $1%$2@$3 Undo all but the last.
R$*@$* $@$1<@$2> Put back the brackets.
S0
################################################################################
#####
##### RULESET ZERO PREAMBLE
#####
##### The beginning of ruleset zero is constant through all configurations.
#####
################################################################################
# perhaps an aesthetic crime to put it here, but have to catch DECNET early...
R$w::$- <@>:$1
R$-::$- $2<@$1.decnet>
# first make canonical
R$*<$*>$* $1$2$3 defocus
R$+ $:$>3$1 make canonical
# handle special cases.....
R@ $#local$:$n handle <> form
# handle [a.b.c.d] host addresses
R$*<@[$+]>$* $#nonlclsmtp$@[$2]$:$1@[$2]$3 numeric internet spec
# now delete the local info
R$+<@$W.UUCP> $1<@> us as uucp address
R$*<$*$W.UUCP>$* $1<$2>$3 thishost
R<@$w:>$* <@>:$1 we were head of the route
R<@$W:>$* <@>:$1 we were head of the route
R$+ $:$>7$1 more of us at head of route
R$+ $:$>6$1 other names for this host
R$*<$*.>$* $1<$2>$3 drop trailing dot
# and retry
R<@>:$* $@$>0$1 retry after route strip
R$*<@> $@$>0$1 strip null trash & retry
################################################################################
### Machine-dependent part of ruleset zero
### Distinctive characteristics: serves as uucp hub, utilizes the name server
################################################################################
R<@$+>$*:$+:$+ <@$1>$2,$3:$4 <route-addr> canonical
##
# (doesn't work either)
R$+<@[128.138.240.1]>$* $#local$:$1
# numeric internet spec (broken 'cause of name server at the moment)
R$*<@[$+]>$* $#nonlclsmtp$@[$2]$:$1@[$2]$3
##
# first try local smtp-able neighbor, then try uucp neighbor
R$+<@$=C> $#lclsmtp$@$2$:$1<@$2>
R$+<@$=C.$D> $#lclsmtp$@$2$:$1<@$2>
R$+<@$=C.UUCP> $#lclsmtp$@$2$:$1<@$2>
R$+<@$=C.$D.UUCP> $#lclsmtp$@$2$:$1<@$2>
R<@$=C>:$+ $#lclsmtp$@$1$:<@$1>:$2
R<@$=C.$D>:$+ $#lclsmtp$@$1$:<@$1>:$2
R<@$=C.$D.UUCP>:$+ $#lclsmtp$@$1$:<@$1>:$2
##
# special class of uucp neighbors (in Colorado.EDU domain) that like Internet addresses
R$+<@$=Y> $#uusndmail$@$2$:$1<@$2>
R$+<@$=Y.$D> $#uusndmail$@$2$:$1<@$2>
R$+<@$=Y.UUCP> $#uusndmail$@$2$:$1<@$2>
R<@$=Y>:$+ $#uusndmail$@$1$:<@$1>:$2
R<@$=Y.$D>:$+ $#uusndmail$@$1$:<@$1>:$2
##
# next see if it is a local decmailable neighbor
R$+<@$=V.UUCP> $#lclsmtp$@$V$:$1<@$2> user@dnethost.UUCP
R$+<@$=V> $#lclsmtp$@$V$:$1<@$2> user@dnethost
R$+<@$=V.$D> $#lclsmtp$@$V$:$1<@$2> user@dnethost.domain
R$+<@$-.DECNET> $#lclsmtp$@$V$:$1<@$2.DECNET> user@dnethost.DECNET
R$+<@$-.DNET> $#lclsmtp$@$V$:$1<@$2.DECNET> user@dnethost.DNET
R$+<@$-.DNET.$D> $#lclsmtp$@$V$:$1<@$2.DECNET> user@dnethost.DNET.domain
R$+<@$-.DECNET.$D> $#lclsmtp$@$V$:$1<@$2.DECNET> user@dnethost.decnet.domain
R<@$=V>:$+ $#lclsmtp$@$V$:<@$1:$2> @dnethost:whatever
R<@$-.DECNET>:$+ $#lclsmtp$@$V$:<@$1.DECNET:$2> @dnethost.DECNET:whatever
R<@$-.DECNET.$D>:$+ $#lclsmtp$@$V$:<@$1.DECNET:$3> @dnethost.decnet.domain:whtevr
##
# next, see if it is a local UUCP neighbor
R$+<@$w.UUCP> $#local$:$1 thishost.UUCP
R$+<@$w.$D.UUCP> $#local$:$1 thishost.UUCP
R$+<@$=U.UUCP> $#uucp$@$2$:$1 uucpneighbor.UUCP
R$+<@$=U> $#uucp$@$2$:$1 uucpneighbor
R$+<@$=U.$D> $#uucp$@$2$:$1 uucpneighbor.colorado.edu
##
# if it is in uucp format and still isn't resolved, foist it off on pathalias
R$+<@$+.UUCP> $#palias$@$2$:$1 call uucp via mystical pathalias
##
# by this time we have tried everything imaginable to resolve user@host.colorado.edu,
# don't try higher authority, since they will just spit it back at us.
R$+<@$-.$D> $#error$:Host: $2 Non-existent in the $D domain
R<@$-.$D>:$+ $#error$:Host: $1 Non-existent in the $D domain
##
# resolve 'phony' domains...
R$*<@$+.BITNET>$* $#nonlclsmtp$@$B$:$1@$2.BITNET$3
R<@$+.BITNET>:$* $#nonlclsmtp$@$B$:@$1.BITNET:$2
##
# anything in the T class is considered nameservable..
R$+<@$+.$=T> $#nonlclsmtp$@$2.$3$:$1<@$2.$3>
R$+<@$+.$+.$=T> $#nonlclsmtp$@$2.$3.$4$:$1<@$2.$3.$4>
R$+<@$+.$+.$+.$=T> $#nonlclsmtp$@$2.$3.$4.$5$:$1<@$2.$3.$4.$5>
R<@$+.$=T>:$+ $#nonlclsmtp$@$1.$2$:<@$1.$2>:$3
R<@$+.$+.$=T>:$+ $#nonlclsmtp$@$1.$2.$3$:<@$1.$2.$3>:$4
R<@$+.$+.$+.$=T>:$+ $#nonlclsmtp$@$1.$2.$3.$4$:<@$1.$2.$3.$4>:$5
##
# Let CSNET deal w/anything else...
R$+<@$+.CSNET> $#csnet$@relay.cs.net$:$1<@$2> user@anything.CSNET
R$+<@$+> $#csnet$@$S$:$1<@$2>
R<@$+>:$+ $#csnet$@$S$:<@$1>:$2
##
# everything else must be a local name
R$- $#local$:$1 local names
##
# let the ":include:" aliases hack get to local too.
R:include:$+ $#local$::include:$1
R/$+ $#local$:/$1
##
# if it got to here, we are stumped.
R$+ $#error$: $1: Unparseable address
##
# end of the fabulous ruleset 0. Go read some other short fiction.
################################################################################
### Mailer lclsmtp: local smtp Internet mailer specification
################################################################################
Mlclsmtp, P=[IPC], F=msCDFMuX, S=20, R=21, E=\r\n, A=IPC $h
S20
################################################################################
### Ruleset 20: sender rewriting for local smtp mailer
################################################################################
R$+<@$=Y> $@$1%$2<@$W> Unfortunate, but necessary
# pass <route-addr>'s through
R<@$+>$* $@<@$1>$2 resolve <route-addr>
# handle other external cases
R$+<@$-> $@$1<@$2> user@host
R$+<@[$+]> $@$1<@[$2]> [a.b.c.d]
# convert remaining addresses to old format and externalize appropriately
R$- $@$1@$?H$H$|$W$.
# respect bhangist
R$+<@$+.UUCP> $:$2!$1
R$W!$W!$+ $@$W!$1
S21
################################################################################
### Ruleset 21: recipient rewriting for local smtp mailer
################################################################################
# respect bhangist
R$+<@$+.UUCP> $:$2!$1
################################################################################
### Mailer nonlclsmtp: non-local Internet mailer specification
################################################################################
Mnonlclsmtp, P=[IPC], F=msRDFPMueXL, S=14, R=15, A=IPC $h, E=\r\n
S14
################################################################################
### Ruleset 14: sender rewriting for non-local smtp mailer
################################################################################
# pass <route-addr>'s through
R<@$+>$* $@<@$1>$2 resolve <route-addr>
# machines in $A are hidden
R$+<@$=A> $@$1<@$W.$D> user@clubhost -> user@thishost.domain
R$+<@$=A.$D> $@$1<@$W.$D> same thing w/domains
# machines in $C but not $A get fully qualified and percentified..
R$+<@$=C> $@$1%$2<@$W.$D>
R$+<@$=C.$D> $@$1%$2<@$W.$D>
# machines in $V but not $A get fully qualified and percentified..
R$+<@$=V> $@$1%$2<@$W.$D>
R$+<@$=V.$D> $@$1%$2<@$W.$D>
# get rid of uucp-like things..
R$+<@$+.UUCP> $@$2!$1<@$W.$D>
# machines not in either $C or $V (with one token) get percentified..
R$-<@$+> $@$1%$2<@$W.$D>
# machines not in either $C or $V get source routed (ugly)
R$+<@$+> $@@$W.$D:$1<@$2>
# internet numeric literal
R$+<@[$+]> $@$1<@[$2]> [a.b.c.d]
# convert remaining addresses to old format and externalize appropriately
R$- $@$1<@$W.$D> tack on our hostname
# respect bhangist, but reconcile
R$+<@$+.UUCP> $:$2!$1<@$W.$D>
R$W!$+<@$+> $@$1<@$2> remove duplicate
S15
################################################################################
### Ruleset 15: recipient rewriting for non-local smtp mailer
################################################################################
# null ruleset
################################################################################
### Mailers local and prog: local and program mailer specifications
################################################################################
Mlocal, P=/bin/mail, F=rlsDFmn, S=10, R=11, A=mail -d $u
Mprog, P=/bin/sh, F=lsDFMe, S=10, R=11, A=sh -c $u
S10
################################################################################
### Ruleset 10: sender rewriting for local and prog mailers
################################################################################
R@ sendmail@$W?g.$D errors to mailer-daemon
# respect bhangist
R$+<@$+.UUCP> $:$2!$1
S11
################################################################################
### Ruleset 11: recipient rewriting for local and prog mailers
################################################################################
# respect bhangist
R$+<@$+.UUCP> $:$2!$1
################################################################################
### Mailers uucp and palias: UUCP and path alias mailer specification
################################################################################
Muucp, P=/usr/bin/uux, F=sCDRMhumU, S=12, R=13, M=100000,
A=uux - -gC -a$f $h!rmail ($u)
Mpalias, P=/usr/local/etc/uumail, F=hsuCDFMSU, S=12, R=13, M=100000,
A=uumail -f $g $h!$u
S12
################################################################################
### Ruleset 12: sender rewriting for uucp, palias mailers
################################################################################
R$W!$1 $@$W!$1
R$+%$=C<@$W> $@$W!$2!$1
R$+<@$W.UUCP> $@$W!$1
R$+<@$W> $@$W!$1
R$+<@$=A.UUCP> $@$W!$1 alias clubbers are invisible
R$+<@$=A> $@$W!$1
R$- $@$W!$1
R$+<@$-> $@$W!$2!$1
R$+<@$-.$D> $@$W!$2!$1
R$+<@$-.decnet> $@$W!$2!$1
R$+<@$-.decnet.$D> $@$W!$2!$1
R$+<@$+.UUCP> $@$W!$2!$1
R$+<@$+> $@$W!$2!$1
R$+ $@$W!$1
S13
################################################################################
### Ruleset 13: recipient rewriting for uucp, palias mailers
################################################################################
R$+<@$-> $@$2!$1
R$+<@$-.$D> $@$2!$1
R$+<@$+.UUCP> $@$2!$1
R$+<@$+> $@$2!$1
#
################################################################################
### Mailer ns: Internet name server mailer specification
################################################################################
Mns, P=[IPC], F=msRDFPMueXL, S=22, R=23, A=IPC $h, E=\r\n
S22
################################################################################
### Ruleset 22: sender rewriting for ns mailer
################################################################################
# pass <route-addr>'s through
R<@$+>$* $@<@$1>$2 resolve <route-addr>
R$+<@$-> $@$1@$2.$D user@host->user@host.ourdomain
R$- $@$1@$W.$D user->user@host.ourdomain
R$+<@$+.UUCP> $:$2!$1@$W user@host.uucp->host!user@host.ourdomain
S23
################################################################################
### Ruleset 23: recipient rewriting for ns mailer
################################################################################
# null ruleset
################################################################################
### Mailer csnet: CSNET mailer specification
################################################################################
Mcsnet, P=[IPC], F=msRDFPMueXL, S=18, R=19, A=IPC $h, E=\r\n
#
# Notice that the PMDF mailer DOES NOT USE the host field. We set this
# field to "CSNET-RELAY" in all instances where we call the PMDF mailer
# so as to be able to send one copy of a letter with many recipients.
S18
################################################################################
### Ruleset 18: sender rewriting for csnet mailer
################################################################################
R$-<@$=A> $@$1<@$W.$D>
R$-<@$=A.$D> $@$1<@$W.$D>
R$-<@$=C> $@$1<@$2.$D>
R$-<@$-.decnet> $@$1<@$2.$D>
R$- $@$1<@$W.$D>
# respect bhangist, but reconcile slightly
R$+<@$+.UUCP> $:$1<@$W.$D>
R$W!$+<@$+> $@$1<@$2>
S19
################################################################################
### Ruleset 19: recipient rewriting for csnet mailer
################################################################################
# null ruleset
################################################################################
### Mailer uusndmail: non-local smtp via uucp
################################################################################
Muusndmail, P=/usr/bin/uux, F=sCDRMFhum, S=24, R=25, M=100000,
A=uux - -gC -z -a$f $h!sendmail \(-f $g $u \)
# basic philosophy is that a fictitious address "$Q.Colorado.EDU"
# will be supported until it can be legitimately converted to uswest.com
S24
################################################################################
### Ruleset 24: sender rewriting for uusndmail mailer
################################################################################
R<@$+>$* $@<@$1>$2 resolve <route-addr>
# machines in $C are hidden
R$+<@$=C> $@$1<@$Q.Colorado.EDU>
R$+<@$=C.UUCP> $@$1<@$Q.Colorado.EDU>
R$+<@$=C.COM> $@$1<@$Q.Colorado.EDU>
R$+<@$=C.$D> $@$1<@$Q.Colorado.EDU>
# all others in user@host format get percentified
R$+<@$-> $@$1%$2<@$Q.Colorado.EDU>
# preserve alien bang-like junk
R$+<@$+.UUCP> $@$2!$1<@$Q.Colorado.EDU>
# internet numeric literal
R$+<@[$+]> $@$1<@[$2]> [a.b.c.d]
# convert remaining addresses to old format and externalize appropriately
R$- $@$1<@$Q.Colorado.EDU> tack on our hostname
R$w!$+<@$+> $@$1<@$2> remove duplicate
S25
################################################################################
### Ruleset 25: recipient rewriting for uusndmail mailer
################################################################################
R$-<@$=C> $@$1<@$Q.Colorado.EDU> tack on our hostname